import http from "@/utils/http";
import type { MutationTree, ActionTree, GetterTree } from "vuex";
import type { State } from "../index";
interface Infos {
  [index: string]: unknown;
}
export interface SignsState {
  infos: Infos;
}
const state: SignsState = {
  infos: {},
};
const mutations: MutationTree<SignsState> = {
  updateInfos(state, payload) {
    state.infos = payload;
  },
};
const actions: ActionTree<SignsState, State> = {
  getTime(c, p) {
    return http.get("signs/time", p);
  },
  putTime(c, p) {
    return http.put("/signs/time", p);
  },
};
const getters: GetterTree<SignsState, State> = {};
export default {
  namespaced: true,
  state,
  mutations,
  actions,
  getters,
};
